package com.cn.design.openshut;

/**
 * @author Chenhaowen
 * @since 2019/8/7 17:30.
 */
public class DiscountProduct extends AProduct {

    public DiscountProduct(String name, Double price, Integer type) {
        super(name, price, type);
    }

    @Override
    public Double getPrice() {
        return super.getPrice() * 0.88;
    }

    public static void main(String[] args) {
        DiscountProduct discountProduct = new DiscountProduct("电脑",15999.0,1);
        System.out.println("商品名称:" + discountProduct.getName()
                + "\n商品价格：" + discountProduct.getPrice()
                + "\n商品类型：" + discountProduct.getType());
    }
}
